package com.globalwave.common.service;

import com.globalwave.common.ArrayOrderList;
import com.globalwave.common.ArrayPageList;
import com.globalwave.common.entity.SyncBatch;
import com.globalwave.common.entity.SyncBatchCriterion;

public interface SyncBatchService {
    
    public ArrayPageList<SyncBatch> query(
            SyncBatchCriterion criterion, 
            int pageIndex, 
            int pageSize,
            ArrayOrderList orderList) 
    throws Exception ;
    
    public SyncBatch create(SyncBatch syncBatch) throws Exception ;
    public void update(SyncBatch syncBatch) throws Exception ;
    public void delete(SyncBatch syncBatch) throws Exception ;
    public void deleteAll(Long[] ids) throws Exception ;
    public void resetToSyncable(SyncBatch syncBatch) throws Exception ;

    public void updateSuccess(SyncBatch syncBatch) throws Exception ;
    public void updateFail(SyncBatch syncBatch, Exception e) throws Exception ;
    
    public ArrayPageList<SyncBatch> querySyncableBatch(Long startId, Integer threadId) throws Exception ;
}
